<%@ page language="java"  pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #department-tb{
            width: 700px;
            margin: 0;
            border: 1px solid black;
            border-collapse: collapse;
            background-color: #67B168;

        }
        #department-tb th,td{
            border: 1px solid black;
            padding: 5px;
            text-align: center;
            width: 5px;
            font-size: small;
        }

    </style>
</head>
<body>
<table id="department-tb">

    <caption></caption>
    <tr>
        <th>编号</th>
        <th>名称</th>
        <th>创建时间</th>
        <th>创建人</th>
        <th>修改时间</th>
        <th>修改人</th>
        <th>状态</th>
    </tr>
    <c:forEach items="${departments}" var="department" varStatus="status">

        <form action="#" method="post">

            <tr>
                <td><input type="checkbox">${status.index + 1}</td>
                <td>${department.departmentName}</td>
                <td>${department.createTime}</td>
                <td>${department.founder}</td>
                <td>${department.modificationTime}</td>
                <td>${department.modifier}</td>
                <td>
                <c:if test="${department.state == 1}" >
                    启用
                </c:if>
                <c:if test="${department.state != 1}" >
                    停用
                </c:if>
                </td>

                <td><a href="/deleteDep?departmentId=${department.departmentId}">删除</a></td>
            </tr>
        </form>

    </c:forEach>

</table>


</body>
</html>